package cn.stylefeng.guns.modular.storeProcurement.mapper;

import cn.stylefeng.guns.modular.storeProcurement.entity.StoreProcurementDetaild;
import cn.stylefeng.guns.modular.storeProcurement.model.params.StoreProcurementDetaildParam;
import cn.stylefeng.guns.modular.storeProcurement.model.result.StoreProcurementDetaildResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 门店采购单明细表 Mapper 接口
 * </p>
 *
 * @author wp
 * @since 2025-09-02
 */
public interface StoreProcurementDetaildMapper extends BaseMapper<StoreProcurementDetaild> {

    /**
     * 获取列表
     *
     * @author wp
     * @Date 2025-09-02
     */
    List<StoreProcurementDetaildResult> customList(@Param("paramCondition") StoreProcurementDetaildParam paramCondition);

    /**
     * 获取map列表
     *
     * @author wp
     * @Date 2025-09-02
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") StoreProcurementDetaildParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author wp
     * @Date 2025-09-02
     */
    Page<StoreProcurementDetaildResult> customPageList(@Param("page") Page page, @Param("paramCondition") StoreProcurementDetaildParam paramCondition, @Param("condition") String condition);

    /**
     * 获取分页map列表
     *
     * @author wp
     * @Date 2025-09-02
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") StoreProcurementDetaildParam paramCondition);

    Page<StoreProcurementDetaildResult> customGoodsPageList(@Param("pageContext") Page pageContext, @Param("storeProcurementDetaildParam") StoreProcurementDetaildParam storeProcurementDetaildParam, @Param("condition") String condition);

    void deleteByGoodsId(@Param("orderOutNumber") String  orderOutNumber,@Param("goodsId") Long goodsId);

    List<StoreProcurementDetaildResult> findListByGoodsId(@Param("orderOutNumber") String orderOutNumber, @Param("goodsId") Long goodsId);

}
